CREATE TABLE DAC_ISSUE
(
  ISSUE_ID    SERIAL,
  ISSUE_TITLE    VARCHAR(255)   NOT NULL    ,
  ISSUE_DESC    VARCHAR(2000)   NULL    ,
  ISSUE_STS    INTEGER   NOT NULL    ,
  ISSUE_TYP    VARCHAR(50)   NULL    ,
  ISSUE_OWNR    VARCHAR(50)   NULL    ,
  ISSUE_PRGS    NUMERIC(18, 2)   NULL    ,
  CREATE_TM    DATE   NOT NULL    ,
  ISSUE_LOCKED    INTEGER   NULL    ,
    CONSTRAINT PK_DAC_ISSUE PRIMARY KEY (ISSUE_ID)
)
;

CREATE TABLE DAC_USER
(
  USER_ID    VARCHAR(50)   NOT NULL    ,
  USERNAME    VARCHAR(50)   NOT NULL    ,
  FULLNAME    VARCHAR(255)   NULL    ,
  USER_PWD    VARCHAR(50)   NULL    ,
  CHANGINGPWD    INTEGER   NULL    ,
  USERLOCKED    INTEGER   NULL    ,
  LASTLOGIN    DATE   NULL    ,
  USER_DESC    VARCHAR(2000)   NULL    ,
    CONSTRAINT PK_DAC_USER PRIMARY KEY (USER_ID)
)
;

CREATE TABLE DAC_LINE
(
  POINT_ID    SERIAL,
  POINT    VARCHAR(50)   NULL    ,
    CONSTRAINT PK_DAC_LINE PRIMARY KEY (POINT_ID)
)
;

CREATE TABLE DAC_MUTIPLEKEYS
(
  DAC_KEY1    VARCHAR(50)   NOT NULL    ,
  DAC_KEY2    VARCHAR(50)   NOT NULL    ,
  DAC_VALUE1    VARCHAR(50)   NULL    ,
  DAC_VALUE2    VARCHAR(50)   NULL    ,
    CONSTRAINT PK_DAC_MUTIPLEKEYS PRIMARY KEY (DAC_KEY1, DAC_KEY2)
)
;

